<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.cxk.hr.pojo.*"%>
<%@ page import="com.baomidou.mybatisplus.plugins.Page"%>
<%@page import="com.cxk.hr.util.MTimeUtil"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HR医院 - 员工工资列表</title>
<meta name="keywords" content="">
<meta name="description" content="">

<link rel="shortcut icon" href="favicon.ico">
<link href="<%=path%>/statics/css/bootstrap.min.css?v=3.3.6"
	rel="stylesheet">
<link href="<%=path%>/statics/css/font-awesome.css?v=4.4.0"
	rel="stylesheet">

<!-- Data Tables -->
<link
	href="<%=path%>/statics/css/plugins/dataTables/dataTables.bootstrap.css"
	rel="stylesheet">
<link href="<%=path%>/statics/css/animate.css" rel="stylesheet">
<link href="<%=path%>/statics/css/style.css?v=4.1.0" rel="stylesheet">

<link rel="stylesheet" type="text/css"
	href="<%=path%>/statics/dist/sweetalert.css">
</head>
<body class="gray-bg">
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>员工工资列表</h5>
					</div>
					<input type="sumbit" onclick="export_excel()" value="导出Excel"
						class="btn btn-success">
					<div class="ibox-content">
						<table
							class="table table-striped table-bordered table-hover dataTables-example">
							<thead>
								<tr>
									<th>序号</th>
									<th>工号</th>
									<th>姓名</th>
									<th>薪级工资</th>
									<th>岗位工资</th>
									<th>效益工资</th>
									<th>医龄补贴</th>
									<th>职务补贴</th>
									<th>津贴补贴</th>
									<th>应该工资</th>
									<th>缺勤罚金</th>
									<th>社保</th>
									<th>公积金</th>
									<th>个人所得税</th>
									<th>实发工资</th>
								</tr>
							</thead>
							<tbody>
								<%
									List<Salary> sals = (List<Salary>) request.getAttribute("salaries");
									System.out.println(sals);
									if (null != sals && null != sals.get(0) && sals.size() > 0) {
										int index = 1;
										for (Salary salary : sals) {
											salary = sals.get(index - 1);
								%>
								<tr class="gradeA">
									<td><%=index++%></td>
									<td><%=salary.getEmployeeNumber()%></td>
									<td><%=salary.getName()%></td>
									<td><%=salary.getPayGradeSalary()%></td>
									<td><%=salary.getPostWages()%></td>
									<td><%=salary.getAchievementsRelatedWages()%></td>
									<td><%=salary.getWorkSubsidies()%></td>
									<td><%=salary.getDutyAllowance()%></td>
									<td><%=salary.getSubsidy()%></td>
									<td><%=salary.getMoney()%></td>
									<td><%=salary.getAbsentFine()%></td>
									<td><%=salary.getSocialSecurity()%></td>
									<td><%=salary.getAccumulationFund()%></td>
									<td><%=salary.getIndividualIncomeTax()%></td>
									<td><%=salary.getCount()%></td>
								</tr>
								<%
									}
									}
								%>
							</tbody>
						</table>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!-- 全局js -->
	<script src="<%=path%>/statics/js/jquery.min.js?v=2.1.4"></script>
	<script src="<%=path%>/statics/js/bootstrap.min.js?v=3.3.6"></script>
	<script
		src="<%=path%>/statics/js/plugins/jeditable/jquery.jeditable.js"></script>

	<!-- Data Tables -->
	<script
		src="<%=path%>/statics/js/plugins/dataTables/jquery.dataTables.js"></script>
	<script
		src="<%=path%>/statics/js/plugins/dataTables/dataTables.bootstrap.js"></script>

	<!-- 自定义js -->
	<script src="<%=path%>/statics/js/content.js?v=1.0.0"></script>
	<script src="<%=path%>/statics/js/tableExport.js"></script>
	<!-- 分页 -->
	<script type="text/javascript">
		$(document).ready(function() {
			$('.dataTables-example').dataTable();

			var oTable = $('#editable').dataTable();

			oTable.$('td').editable('../example_ajax.php', {
				"callback" : function(sValue, y) {
					var aPos = oTable.fnGetPosition(this);
					oTable.fnUpdate(sValue, aPos[0], aPos[1]);
				},
				"submitdata" : function(value, settings) {
					return {
						"row_id" : this.parentNode.getAttribute('id'),
						"column" : oTable.fnGetPosition(this)[2]
					};
				},
				"width" : "90%",
				"height" : "100%"
			});
		});
		 function export_excel() {
		        $('#table1').tableExport({
		　　　　　　　　type:'excel',
		　　　　　　　　fileName:new Date().getTime(),
		　　　　　　　　escape:'false'
		　　　　　　});
		    }
	</script>
</body>
</html>
